<?php

use think\migration\Seeder;
use app\common\model\Feed;

class CeateFeeedData extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        $faker = Faker\Factory::create('zh_cn');

        for ($i=0;$i<100;$i++){
            Feed::create([
                'title'=>$faker->sentence,
                'content'=>$faker->text,
                'uid'=>1,
                'show'=>1,
                'create_time'=>time()
            ]);
        }

    }
}